/**
 * @class Ext.app.Portal
 * @extends Object
 * A sample portal layout application class.
 */
Ext.define('EUniversitySuperAdmin.view.portal.pviewport', {
	 extend: 'Ext.panel.Panel',
    alias: 'widget.pviewport',
    requires:[
        'EUniversitySuperAdmin.view.portal.columns',
        'EUniversitySuperAdmin.view.portal.column',
        'EUniversitySuperAdmin.view.actiontree.rightmenu'
       
    ],

    initComponent:function () {
       
        Ext.apply(this, {
            id:'app-viewport',
            layout:{
                type:'border',
                padding:'0 5 5 5' // pad the layout from the window edges
            },
            items:[{
                id:'app-header',
                xtype:'box',
                region:'north',
                height:40,
                html:'Tableau de bord'
            },{
                xtype:'container',
                region:'center',
                layout:'border',
                items:[ {
                    id:'app-portal',
                    xtype:'portalpanel',
                    region:'center',
                    items:[{
                    	 height:'300px',
                        id:'col-1',
                        items:[{
                            title:'Grid Portlet',
                            tools:this.getTools(),
                            height:'300px',
						       html:"<img src='resources/images/chart.png'/>",

                            items:[
									new Ext.Component({
									    loader: {
									       url: 'http://localhost/',
									       html:"<img src='resources/images/Sans titre.png'/>",
									       
									       autoLoad: true,
									       scripts: true
									       }
									    })
                                  ]
                        	}
        			        ]
                    },{
                        id:'col-2',
                        items:[{
                            title:'Bienvenu',
                            tools:this.getTools(),
                            
                            loader: {
							       url: 'admin/gpersonnalisation/',
							       
							       autoLoad: true,
							       scripts: true
							       }
                        }]
                    },{
                        id:'col-3',
                        items:[{
                            title:'tree',
                            tools:this.getTools(),
                            height:'190px',
                            html:"<img src='resources/images/uvt.jpg'/>"+
		            	  		"<a href='http://www.uvt.rnu.tn/uvt/'>http://www.uvt.rnu.tn/uvt/</a>"
                        }]
                    }]
                }]
            }]
        });
        this.callParent(arguments);
    },
    getTools:function () {
        return [{
            xtype:'tool',
            type:'gear',
            handler:function (e, target, panelHeader) {
                var portlet = panelHeader.ownerCt;
                portlet.fireEvent('toolClick', portlet);
            }
        }];
    }
});
